import request from '@/utils/request'

// 房间管理
export function getRoomList(data) {
  return request({
    url: '/park/room/list',
    method: 'get',
    data,
    isJson: false,
  })
}

// 获取房间所有数据
export function getRoomAllList(data) {
  return request({
    url: '/park/room/listAll',
    method: 'get',
    data,
    isJson: false,
  })
}

// 房间详情
export function getRoomDetail(data) {
  return request({
    url: '/park/room/' + data,
    method: 'get',
    isJson: true,
  })
}

// 房间新增
export function addRoom(data) {
  return request({
    url: '/park/room',
    method: 'post',
    data,
    isJson: true,
  })
}

// 房间修改
export function editRoom(data) {
  return request({
    url: '/park/room',
    method: 'put',
    data,
    isJson: true,
  })
}

// 房间删除
export function delRoom(data) {
  return request({
    url: '/park/room/' + data,
    method: 'delete',
    isJson: true,
  })
}

// 楼层下拉数据
export function getFloorListAll(data) {
  return request({
    url: '/park/floor/listAll',
    method: 'get',
    data,
    isJson: true,
  })
}

// 房间空床数据
export function getEmptyBedList(data) {
  return request({
    url: '/park/bed/listAllEmpty',
    method: 'get',
    data,
    isJson: true,
  })
}

// 房间入住数据
export function getRzBedList(data) {
  return request({
    url: '/park/bed/listAllRz',
    method: 'get',
    data,
    isJson: true,
  })
}

// 房位信息数据
export function getBunkList(data) {
  return request({
    url: '/park/bed/list',
    method: 'get',
    data,
    isJson: true,
  })
}

// 入住
export function netCheckIn(data) {
  return request({
    url: '/park/bedProcess/checkIn',
    method: 'post',
    data,
    isJson: true,
  })
}

// 退房
export function netCheckOut(data) {
  return request({
    url: '/park/bedProcess/checkOut',
    method: 'post',
    data,
    isJson: true,
  })
}

// 换房换铺
export function netReplace(data) {
  return request({
    url: '/park/bedProcess/replace',
    method: 'post',
    data,
    isJson: true,
  })
}

// 变更房间
export function netUpdateRoom(data) {
  return request({
    url: '/park/room/updateRoom',
    method: 'post',
    data,
    isJson: true,
  })
}

// 床位历史
export function getHistoryList(data) {
  return request({
    url: '/park/bedH/list',
    method: 'get',
    data,
    isJson: false,
  })
}

// 房务记录
export function getRoomRecordList(data) {
  return request({
    url: '/park/bedProcess/list',
    method: 'get',
    data,
    isJson: false,
  })
}

// 配置标准数据
export function getRoomConfigList(data) {
  return request({
    url: '/park/roomConfigStandard/listAll',
    method: 'get',
    data,
    isJson: false,
  })
}

// 初始化配置
export function netInit(data) {
  return request({
    url: '/park/roomConfigDetail/init',
    method: 'post',
    data,
    isJson: true,
  })
}

// 新增房间配置明细
export function addRoomConfigDetail(data) {
  return request({
    url: '/park/roomConfigDetail',
    method: 'post',
    data,
    isJson: true,
  })
}

// 删除房间配置明细
export function delRoomConfigDetail(data) {
  return request({
    url: '/park/roomConfigDetail/' + data,
    method: 'delete',
    isJson: true,
  })
}

// 公寓检查数据
export function getRoomCheckList(data) {
  return request({
    url: '/park/buildingCheck/list',
    method: 'get',
    data,
    isJson: false,
  })
}

// 公寓检查详情
export function getRoomCheckDetail(data) {
  return request({
    url: '/park/buildingCheck/' + data,
    method: 'get',
    isJson: true,
  })
}

// 公寓检查明细数据
export function getRoomCheckDetailAllList(data) {
  return request({
    url: '/park/buildingCheckDetail/listAll',
    method: 'get',
    data,
    isJson: true,
  })
}

// 公寓检查明细提交
export function netRoomCheckDetail(data) {
  return request({
    url: '/park/buildingCheckDetail',
    method: 'put',
    data,
    isJson: true,
  })
}

// 公寓检查提交
export function netRoomCheckFinish(data) {
  return request({
    url: '/park/buildingCheck/checkFinish',
    method: 'put',
    data,
    isJson: true,
  })
}

// 公寓检查整改
export function netRoomCheckRectify(data) {
  return request({
    url: '/park/buildingCheck/rectify',
    method: 'put',
    data,
    isJson: true,
  })
}

// 公寓检查复查
export function netRoomCheckReview(data) {
  return request({
    url: '/park/buildingCheck/review',
    method: 'put',
    data,
    isJson: true,
  })
}